#ifndef ZIGBEEDEVICE_H
#define ZIGBEEDEVICE_H

#include "BaseDevice.h"
#include "Protocol/PointProtocol.h"
#include "Protocol/ZigbeeConfigProtocol.h"
#include "Protocol/ZigbeeControlProtocol.h"
#include "Protocol/ZigbeeNewControlProtocol.h"
#include "Command/PointProtocol/WinSetZigbeeParamCmd.h"
#include "Command/ZigbeeProtocol/SetZigbeeParamCmd.h"
#include "Command/PointProtocol/WinGetZigbeeParamCmd.h"
#include "Command/ZigbeeProtocol/GetZigbeeParamCmd.h"
#include "Command/PointProtocol/WinRestartZigbeeCmd.h"
#include "Command/PointProtocol/WinStartNewZigbeeCmd.h"
#include"Command/PointProtocol/WinSetNewZigbeeCmd.h"
#include "Command/ZigbeeProtocol/RestartZigbeeCmd.h"
#include "Command/ZigbeeProtocol/EquipmentIntoNetCmd.h"
#include "Command/ZigbeeProtocol/ReceiveControlPointListCmd.h"
#include "Command/ZigbeeProtocol/SendControlPointListCmd.h"
#include "Command/ZigbeeProtocol/AiringControlPointListCmd.h"
#include"Command/ZigbeeProtocol/SetNewZigbeeNetCmd.h"
#include "Command/ZigbeeProtocol/Zigbee3NewJoinParamCmd.h"
#include"Command/ZigbeeProtocol/Zigbee3ControlPointListCmd.h"
#include "Command/ZigbeeProtocol/Zigbee3QueryBackCmd.h"
#include"Command/ZigbeeProtocol/ZigBeeDeliverCmd.h"

#include "Function/ControlPointFunc.h"

#include "File/Xml/ZigbeeListXml.h"
#include "File/Xml/Zigbee3ListXml.h"
#include "File/Xml/SceneListXml.h"
#include "File/Xml/SavePointXml.h"
class ZigbeeDevice : public BaseInterface<ZigbeeDevice>
{
    Q_OBJECT
public:
    Q_INVOKABLE explicit ZigbeeDevice(QObject *parent = 0);
private:

     QTimer *notifyRebootTimer;
     quint32 m_rebootTimerCount;
     quint8 m_isFirstNotify;


    PointProtocol *pointProtocol;
    ZigbeeConfigProtocol *zigbeeConfigProtocol;
    ZigbeeControlProtocol *zigbeeControlProtocol;
    ZigbeeNewControlProtocol *zigbeeNewControlProtocol;
    void winSetZigbeeParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void setZigbeeParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void winGetZigbeeParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void getZigbeeParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void winRestartZigbeeCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void restartZigbeeCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void winStartNewZigbeeCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);
    void equipmentIntoNetCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void receiveControlPointListCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void winSetAllowJoinCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);
    void winSetBanJoinCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);
    void winQueryZigbeeVersionCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);
    void controlPointFuncHandle(QSharedPointer<BaseFunc> sharedFunc);
    void winQueryNewZigbeeParamCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);
    void Zigbee3NewJoinParamCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);
    void ZigBeeDeliverCmdHandle(PortStruct source, QSharedPointer<BaseCmd> sharedCmd);

public slots:

    void NotifyRebootSlot();
};

#endif // ZIGBEEDEVICE_H
